<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8" />
    <title>23_弹性盒子-flex-基本使用</title>

    <style>

        .container {
            width: 1000px;
            height: 615px;
            border: 5px dashed red;

            /* 设置伸缩容器 */
            display: flex;

            /* 当超过宽度之后 自动换行 */
            flex-wrap: wrap;
            flex-wrap: nowrap;
            flex-wrap: wrap-reverse;


        }

        .item {
            /* float: left; */
            box-sizing: border-box;
            width: 200px;
            height: 200px;
            border: 1px solid black;
            background-color: darkseagreen;
        }
    </style>
</head>

<body>
        <div class="container">
            <div class="item">1</div>
            <div class="item">2</div>
            <div class="item">3</div>
            <div class="item">4</div>
            <div class="item">5</div>
            <div class="item">6</div>
            <div class="item">7</div>
        </div>
</body>

</html>